#ifndef __EMQMQTT_H__
#define __EMQMQTT_H__
#include "stm32f10x.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "defined.h"
#include "adc.h"
u16 mqtt_connect_message(u8 *mqtt_message,char *client_id,char *username,char *password);
void sendMQTTPkt(char *p, int len);
char MqttSample_RecvPkt(void);
void MPublish (void);
u16 mqtt_onenetpublish_message(u8 *mqtt_message, char * topic, char * message,u16 len, u8 qos);
u16 MqttOnenet_Savedata(u8 *t_payload);
u16 mqtt_subscribe_message(u8 *mqtt_message,char *topic,u8 qos,u8 whether);
u8 mqtt_puback_message(u8 *mqtt_message);
void InitFactoryConfigChannelInterval (CHANNELOPTION *pchannel);
u16 protocol_login_message(u8 *mqtt_message);
u16 protocol_Cmd_E_message(u8 *protocol_message);

#endif